'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.home.index);
  // 注册最高管理员 -
  router.post('/user/registerAdmin', controller.user.registerAdmin);
  // user的增删改查接口
  router.post('/user/getUserList', controller.user.getUserList);
  // router.get('/getuser', controller.user.index);
  router.post('/user/createUser', controller.user.createUser);

  router.get('/getPublicKey', controller.pub.getPublicKey);
  // login 登录
  router.post('/user/login', controller.user.login);
};
